﻿<%@ Page Title="Cetatenie" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Cetatenie.aspx.vb" Inherits="eServicii.Cetatenie" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <style type="text/css">
        .hideme
        {
            margin-left: 6px;
        }
        .auto-style1 {
            float: right;
            width: 303px;
            height: 493px;
            margin-left: 0px;
            margin-right: 0px;
            margin-top: 0px;
            text-align: right;
        }
        .auto-style2 {
            float: inherit;
            width: 351px;
            height: 482px;
            margin-left: 400px;
            margin-right: 5px;
            margin-top: 0px;
        }
        .auto-style4 {
            width: 1077px;
            height: 16px;
            margin-left: 3px;
            margin-bottom: 366px;
        }
        .auto-style5 {
            float: left;
            width: 364px;
            height: 496px;
            margin-top: 22px;
            z-index: 1;
            margin-left: 20px;
        }
        .auto-style6 {
            height: 57px;
        }
        .auto-style7 {
            margin-left: 17px;
            margin-top: 2px;
            margin-bottom: 0px;
        }
        .auto-style8 {
            width: 1054px;
            height: 57px;
            margin-left: 28px;
        }
        .auto-style10 {
            width: 1053px;
            margin-left: 9px;
        }
        .auto-style11 {
            z-index: -1;
        }
        .auto-style13 {
            z-index: 1;
            margin-left: 53px;
        }
        .auto-style14 {
            width: 196px;
        }
        .auto-style12 {
            margin-left: 55px;
        }
        .auto-style15 {
            width: 196px;
            height: 6px;
        }
        .auto-style16 {
            height: 6px;
        }
        .auto-style17 {
            width: 325px;
        }
        .auto-style18 {
            width: 190px;
        }
        .auto-style19 {
            width: 121px;
        }
        .auto-style20 {
            width: 130px;
        }
        .auto-style21 {
            margin-left: 39px;
            width: 994px;
        }
        .auto-style22 {}
        .auto-style23 {}
        .auto-style24 {
            margin-left: 380px;
        }
        .auto-style25 {
            width: 81px;
        }
        </style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 class="auto-style6">
        SERVICII CONSULARE</h2>
        
        <div class="auto-style8" 
            style="border: thin solid #808080; background-color: #F7F3F7">
            
<table class="auto-style21">
                <tr>
                    <td class="auto-style17">
                        <asp:Label ID="Label1" runat="server" BackColor="#F7F3F7" Font-Bold="True" 
        Text="Căutare ID programare:  "></asp:Label>

                    </td>
                    <td class="auto-style18">
            
            <asp:Label ID="Label6" runat="server" BackColor="#F7F3F7" Font-Bold="True" 
             Text="Subserviciu"></asp:Label> 
  
         
                    </td>
                    <td class="auto-style19">
            <asp:Label ID="Label7" runat="server" BackColor="#F7F3F7" Font-Bold="True" 
             Text="Taxa "></asp:Label> 
          
                    
                    </td>
                    <td class="auto-style20">
                        <asp:Label ID="Label8" runat="server" BackColor="#F7F3F7" Font-Bold="True" 
             Text="Ordin incasare"></asp:Label> 
                   
                    </td>
                    <td class="auto-style25"> 
                        <asp:Label ID="Label9" 
                runat="server" BackColor="#F7F3F7" Font-Bold="True" 
             Text="Copii minori"></asp:Label> 
                 
                    </td>
                    <td class="auto-style29"> </td>
                </tr>
                <tr>
                    <td class="auto-style17">   
                        <asp:TextBox ID="TextBox1" runat="server" BackColor="#CCCCFF" 
            BorderStyle="Ridge" CssClass="textEntry" Font-Bold="True" Height="20px" 
            style="margin-left: 0px" Width="125px" BorderColor="#DEDFDE" 
            BorderWidth="2px" CausesValidation="True"></asp:TextBox>               
        &nbsp;<asp:Button ID="Button_Cautare" runat="server" 
            Text="&gt;&gt;" BackColor="#003399" 
            Font-Bold="True" ForeColor="White" Height="27px" Width="81px" 
                         />



     <asp:TextBox ID="TextBoxServID" runat="server" Width="17px" ForeColor="Black" 
        Visible="False"></asp:TextBox>

     <asp:TextBox ID="TextBoxMisID" runat="server" Width="16px" ForeColor="Black" 
        Visible="False"></asp:TextBox>

    <asp:TextBox ID="TextBoxSearch" runat="server" Width="16px" Visible="False"></asp:TextBox></td>
                    <td class="auto-style18">
                        <asp:DropDownList 
                ID="DropDownListSubserv" runat="server" Height="26px" 
             Width="171px" DataSourceID="SqlDataSource5" DataTextField="Denumirea" 
                DataValueField="IdService" AutoPostBack="True" BackColor="#CCCCFF"></asp:DropDownList></td>
                    <td class="auto-style19"> 
                        <asp:DropDownList ID="DropDownListTAXA" 
                runat="server" Height="26px" 
             Width="109px" DataSourceID="SqlDataSource6" DataTextField="ValoareTotala" 
                DataValueField="ID_Taxa" AutoPostBack="True" BackColor="#CCCCFF">
         </asp:DropDownList></td>
                    <td class="auto-style20">
                        <asp:TextBox ID="TextBoxChitanta" 
                runat="server" Width="108px" Height="20px" BackColor="#CCCCFF"></asp:TextBox></td>
                    <td class="auto-style25">
                        <asp:DropDownList ID="DropDownListCopiiM" 
                runat="server" Height="26px" 
             Width="56px" BackColor="#CCCCFF">
                <asp:ListItem>-</asp:ListItem>
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
         </asp:DropDownList></td>
                    <td>&nbsp;</td>
                </tr>
            </table>
            </div>
  

<div class="auto-style4" id="<">
 <asp:Panel id="DivButton" runat="server" Width="1066px" CssClass="auto-style7" 
        Height="16px">

         <hr style="margin-right: 0px" class="auto-style10" />
         </asp:Panel> 

<div class="auto-style24">
    <asp:Label ID="LabelMSG" runat="server" Font-Bold="True" ForeColor="#CC3300" 
        Text="Label" Visible="False"></asp:Label>
    </div>
                                                  

<div id="Divgrid" runat="server" class="auto-style1">
         
&nbsp;<table style="width:100%; height: 80px;">
        <tr>
            <td class="auto-style14">
         
    <asp:Button ID="Button3" runat="server" CssClass="auto-style12" Height="31px" 
        Text="Căutare NUME" Width="113px" BackColor="#506272" ForeColor="White" />
            </td>
            <td>

                <asp:Button ID="Button_CautareANC" runat="server" 
             Font-Bold="True" ForeColor="Black" Height="32px" Text="ANC" 
        Width="86px" CssClass="auto-style23" />
            </td>
        </tr>
        <tr>
            <td class="auto-style14">
     <asp:TextBox ID="TextBoxNume" runat="server" BackColor="#DEDFDE" 
            BorderStyle="Ridge" CssClass="textEntry" Font-Bold="True" Height="22px" 
            style="margin-left: 80px" Width="107px" BorderColor="Silver" 
            BorderWidth="2px" CausesValidation="True" Visible="False"></asp:TextBox>               

            </td>
            <td>               

     <asp:TextBox ID="TextBoxPrenume" runat="server" BackColor="#DEDFDE" 
            BorderStyle="Ridge" CssClass="textEntry" Font-Bold="True" Height="22px" 
            style="margin-left: 5px" Width="82px" BorderColor="#DEDFDE" 
            BorderWidth="2px" CausesValidation="True" Visible="False"></asp:TextBox>               
            </td>
        </tr>
        <tr>
            <td class="auto-style15">

                <asp:Label ID="numeprenumeLabel" runat="server" Visible="False"></asp:Label>

                </td>
            <td class="auto-style16"></td>
        </tr>
    </table>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataSourceID="SqlDataSource3" GridLines="Vertical" 
        Height="35px" Visible="False" DataKeyNames="ID,PROG_ID" 
        CssClass="auto-style13" Width="255px" EmptyDataText="Nu sunt programari !"
        >
        <AlternatingRowStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:BoundField DataField="DataNastere" DataFormatString="{0:d}" 
                HeaderText="Data nastere" SortExpression="DataNastere" />
            <asp:BoundField DataField="DataProgramarii" DataFormatString="{0:d}" 
                HeaderText="Data progr" SortExpression="DataProgr" />
            <asp:BoundField DataField="PROG_ID" HeaderText="idProg" 
                SortExpression="ServConsular" />
            <asp:BoundField DataField="ParentID" HeaderText="ParentID" 
                SortExpression="ID_Parent" Visible="False" />
        </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" 
            Height="30px" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" Height="30px" Wrap="False" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#0000A9" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#000065" />
    </asp:GridView>


    <asp:DetailsView ID="DetailsView3" runat="server" AutoGenerateRows="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource4" Height="104px" 
        Width="264px" Visible="False" AllowPaging="True" BackColor="White" 
        BorderColor="#526173" BorderStyle="Solid" BorderWidth="1px" CellPadding="4" 
        CssClass="auto-style21" EmptyDataText="ANC no data!">
        <EditRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" />
        <Fields>
            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" 
                InsertVisible="False" ReadOnly="True" Visible="False">
            </asp:BoundField>
            <asp:BoundField DataField="Nume" 
                HeaderText="Nume prenume" SortExpression="Nume">
            <HeaderStyle Width="110px" />
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="DataNastere" HeaderText="Data nastere" 
                SortExpression="DataNastere" DataFormatString="{0:d}">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="LocTaraNastere" HeaderText="Loc nastere" 
                SortExpression="LocTaraNastere" >
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="FiulFiica" HeaderText="FiulFiica" 
                SortExpression="FiulFiica" Visible="False">
            </asp:BoundField>
            <asp:BoundField DataField="NumeTATA" HeaderText="Nume TATA" 
                SortExpression="NumeTATA">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="NumeMAMA" HeaderText="Nume MAMA" 
                SortExpression="NumeMAMA">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="NrDosar" HeaderText="Nr dosar" 
                SortExpression="NrDosar">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="NrOrdin" HeaderText="Nr ordin" 
                SortExpression="NrOrdin">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="CopiiMinori" HeaderText="Copii minori" 
                SortExpression="CopiiMinori">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="DataDepJur" HeaderText="Data jurământ" 
                SortExpression="DataDepJur" DataFormatString="{0:d}">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="NrCertificat" 
                HeaderText="Nr certificat" SortExpression="NrCertificat">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Domiciliu" HeaderText="Domiciliu" 
                SortExpression="Domiciliu" />
            <asp:BoundField DataField="Observatii" HeaderText="Observatii" 
                SortExpression="Observatii">
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="Misiune1" HeaderText="Misiune" ReadOnly="True" 
                SortExpression="Misiune1" >
            <ItemStyle HorizontalAlign="Left" />
            </asp:BoundField>
            <asp:BoundField DataField="MisiuneID" HeaderText="MisiuneID" 
                SortExpression="MisiuneID" Visible="False" />
        </Fields>
        <FooterStyle BackColor="#526173" ForeColor="White" />
        <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#526173" />
        <PagerStyle BackColor="#637584" ForeColor="White" HorizontalAlign="Left" />
        <RowStyle BackColor="White" ForeColor="#526173" />
    </asp:DetailsView>
</div>

<div ID="DivLeft" runat="server" class="auto-style5" >


    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="ID" DataSourceID="SqlDataSource1" Height="50px" 
        Width="349px" style="margin-left: 2px; margin-top: 0px;" CellSpacing="2" 
        GridLines="None" CssClass="auto-style11">
        <EditRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
        <Fields>
            <asp:CommandField ButtonType="Button" CancelText="Anulează" DeleteText="Şterge" 
                EditText="Modifică" InsertText="Adaugă" NewText="Adaugă persoană" 
                SelectText="Selectează" ShowEditButton="True" 
                UpdateText="Salvează" CausesValidation="False" >
            <ControlStyle Width="130px" />
            <HeaderStyle Height="30px" />
            <ItemStyle Height="30px" />
            </asp:CommandField>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
                ReadOnly="True" SortExpression="ID" >
            <ControlStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" />
            <FooterStyle CssClass="hiddenrow" Font-Size="0pt" Height="0px" />
            <HeaderStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            <ItemStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            </asp:BoundField >
            <asp:BoundField DataField="Nume" HeaderText="Numele" SortExpression="Nume">
            <HeaderStyle Width="130px" />
            </asp:BoundField>
            <asp:BoundField DataField="Prenume" HeaderText="Prenumele" 
                SortExpression="Prenume" />
            <asp:BoundField DataField="ParentID" HeaderText="ParentID" 
                SortExpression="ParentID" >
            <ControlStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" />
            <FooterStyle CssClass="hiddenrow" Font-Size="0pt" Height="0px" />
            <HeaderStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            <ItemStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            </asp:BoundField >
            <asp:BoundField DataField="DataNastere" DataFormatString="{0:dd MMMM yyyy}" 
                HeaderText="Data naşterii" SortExpression="DataNastere" ReadOnly="True" />
            <asp:BoundField DataField="LocNastere" HeaderText="Locul naşterii" 
                SortExpression="LocNastere" />
            <asp:BoundField DataField="TaraNastere1" HeaderText="Tara naşterii" 
                SortExpression="TaraNastere" />
            <asp:BoundField DataField="Pasaport" HeaderText="Pasaport /Act ID" 
                SortExpression="Pasaport" />
            <asp:BoundField DataField="DataExpPasaport" HeaderText="Data expirare act" 
                SortExpression="DataExpACT" DataFormatString="{0:d}" ReadOnly="True" />
            <asp:BoundField DataField="NumeTATA" HeaderText="Prenumele tatălui" 
                SortExpression="NumeTATA" />
            <asp:BoundField DataField="NumeMAMA" HeaderText="Prenumele mamei" 
                SortExpression="NumeMAMA" />
            <asp:BoundField DataField="NumeAnterior" HeaderText="Nume la naştere" 
                SortExpression="NumeAnterior" />
            <asp:BoundField DataField="Sex1" HeaderText="Sex" SortExpression="Sex" 
                Visible="False" ReadOnly="True" />
            <asp:BoundField DataField="Cetatenie" HeaderText="Cetățenie" 
                SortExpression="Cetatenie" />
            <asp:BoundField DataField="Domiciliu" HeaderText="Domiciliu" 
                SortExpression="Domiciliu" />
            <asp:BoundField DataField="JudetDomiciliu1" HeaderText="Provincie/Regiune" 
                SortExpression="LocDomiciliu" />
            <asp:BoundField DataField="TaraDomiciliu1" HeaderText="Țara domiciliu" 
                SortExpression="TaraDomiciliu1" />
            <asp:BoundField DataField="Telefon" HeaderText="Telefon" 
                SortExpression="Telefon" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" 
                ReadOnly="True" />
            <asp:BoundField DataField="Parola" HeaderText="Parola" SortExpression="Parola" 
                Visible="False" />
            <asp:BoundField DataField="Rudenie1" HeaderText="Grad rudenie" 
                SortExpression="RudenieID" />
        </Fields>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#F7F3F7" ForeColor="Black" />
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PROGRAMAREConnectionString %>" 
        SelectCommand="SELECT ID, ParentID, LanguageID, Nume, Prenume, NumeAnterior, Pasaport, DataNastere, (SELECT DenumireJudet FROM Tari_Judete WHERE IdJudet=TaraNastereID) As TaraNastere1, 
        LocNastere, (SELECT Name FROM Classifiers WHERE Code=SexID) As Sex1, Cetatenie, NumeTata, NumeMama, Domiciliu, (SELECT DenumireJudet FROM Tari_Judete WHERE IdJudet=TaraDomiciliuID) As TaraDomiciliu1, 
        (SELECT DenumireJudet FROM Tari_Judete WHERE IdJudet=JudetDomiciliuID) As JudetDomiciliu1, Telefon, Email, Parola, DataExpPasaport, (SELECT name FROM Classifiers WHERE Code=RudenieID) As Rudenie1 FROM Solicitanti WHERE (ID = @SOLICITANT_ID)" 
        UpdateCommand="UpdatePROG" UpdateCommandType="StoredProcedure">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxSearch" Name="SOLICITANT_ID"
PropertyName="Text" Type="Int32" DefaultValue="25" />

        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="SOLICITANT_ID" Type="Int32" />
            <asp:Parameter Name="ParentID" Type="Int32" />
            <asp:Parameter Name="idConsulat" Type="Int32" />
            <asp:Parameter DbType="Date" Name="DataSolicitarii" />
            <asp:Parameter DbType="Date" Name="DataProgramarii" />
            <asp:Parameter DbType="Time" Name="OraProgramarii" />
            <asp:Parameter Name="idService" Type="Int32" />
            <asp:Parameter DbType="Date" Name="DataPrel" />
            <asp:Parameter Name="C_nrInreg" Type="Int32" />
            <asp:Parameter Name="RT_nrInreg" Type="Int32" />
            <asp:Parameter Name="StCIV_nrInreg" Type="Int32" />
            <asp:Parameter Name="Chitanta" Type="String" />
            <asp:Parameter Name="idSubservice" Type="Int32" />
            <asp:Parameter Name="Userid" Type="Int32" />
            <asp:Parameter Name="SERIE_ACT" Type="String" />
            <asp:Parameter Name="SumaAchitata" Type="Int32" />
            <asp:Parameter Name="Valuta" Type="Int32" />
            <asp:Parameter DbType="Date" Name="DataElib" />
            <asp:Parameter Name="Original_PROG_ID" Type="Int32" />
            <asp:Parameter Name="PROG_ID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>


    <asp:SqlDataSource ID="SqlDataSource5" runat="server" 
                   ConnectionString="<%$ ConnectionStrings:PROGRAMAREConnectionString %>" 
                   SelectCommand="SELECT IdService, ParentIDService, Denumirea FROM Services WHERE ParentIDService=@IdServ">
                   <SelectParameters>
                       <asp:ControlParameter ControlID="TextBoxServID" Name="IdServ" 
                           PropertyName="Text" />
                   </SelectParameters>
               </asp:SqlDataSource>


</div>

    <div id="Divcentru" runat="server" class="auto-style2">



    <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" 
        BackColor="White" BorderColor="#E9E9E9" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="3" DataKeyNames="PROG_ID" DataSourceID="SqlDataSource2" 
        GridLines="None" Height="148px" Width="347px" CellSpacing="2" EmptyDataText="Nu există programarea cu acest număr !!!"
        OnDataBound="DetailsView2_DataBound"
        OnItemDeleting="DetailsView2_ItemDeleting" CssClass="auto-style22"
        >
        <CommandRowStyle BorderColor="#B5B6BD" BackColor="White" />
        <EditRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" 
            BorderColor="#B5B6BD" BorderStyle="Solid" />
        <FieldHeaderStyle BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" />
        <Fields>
            <asp:TemplateField ShowHeader="False" InsertVisible="False">
                <EditItemTemplate>
                    <asp:Button ID="ButtonUpdate" runat="server" CausesValidation="True" 
                        CommandName="Update" Text="Salvează" />
                    &nbsp;<asp:Button ID="ButtonCancel_update" runat="server" CausesValidation="False" 
                        CommandName="Cancel" Text="Anulează" />
                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:Button ID="ButtonInsert" runat="server" CausesValidation="True" 
                        CommandName="Insert" Text="Adaugă" />
                    &nbsp;<asp:Button ID="ButtonCancel_insert" runat="server" CausesValidation="False" 
                        CommandName="Cancel" Text="Anulează" />
                </InsertItemTemplate>
                <ItemTemplate>
                     &nbsp;<asp:Button ID="ButtonDELETE" runat="server" CausesValidation="False" 
                        CommandName="Delete" Text="Salvează programarea" Width="230" Height="35" BackColor="#003399" ForeColor="White" Font-Bold="true"/>
                    <br />
                    <asp:Button ID="ButtonEDIT" runat="server" CausesValidation="False" 
                        CommandName="Edit" Text="Modifică progr" Visible="False"/>
                    &nbsp;<asp:Button ID="ButtonNEW" runat="server" CausesValidation="False" 
                        CommandName="New" Text="Adaugă progr" Visible="False"/>
                    
                </ItemTemplate>
                <ControlStyle BackColor="#D6D3CE" ForeColor="Black" />
                <HeaderStyle Height="30px" BackColor="White" />
                <ItemStyle BackColor="White" />
            </asp:TemplateField>
            <asp:BoundField DataField="idConsulat" 
                SortExpression="IdConsulat"  >
            <ControlStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" />
            <FooterStyle CssClass="hiddenrow" Font-Size="0pt" Height="0px" />
            <HeaderStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            <ItemStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            </asp:BoundField>
            <asp:BoundField DataField="DataPrel" DataFormatString="{0:d}" 
                HeaderText="Data preluării" SortExpression="DataPrel" ReadOnly="True" >
            <ControlStyle BorderColor="Black" BorderStyle="Solid" />
            <HeaderStyle Width="130px" />
            </asp:BoundField>
            <asp:BoundField DataField="SOLICITANT_ID" HeaderText="ID_SOLICITANT" 
                SortExpression="SOLICITANT_ID" >
            <ControlStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" />
            <FooterStyle CssClass="hiddenrow" Font-Size="0pt" Height="0px" />
            <HeaderStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            <ItemStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            </asp:BoundField>
            <asp:BoundField DataField="Service1" HeaderText="Serviciul consular" 
                SortExpression="Denumirea" />
            <asp:BoundField DataField="Subservice1" HeaderText="Subserviciul" 
                SortExpression="Subserv" />
            <asp:BoundField DataField="IdService" HeaderText="IdService" 
                SortExpression="IdService" >
                <ControlStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" />
            <FooterStyle CssClass="hiddenrow" Font-Size="0pt" Height="0px" />
            <HeaderStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            <ItemStyle CssClass="hiddenrow" Font-Size="0pt" ForeColor="#DEDFDE" Height="0px" />
            </asp:BoundField>
            <asp:BoundField DataField="C_nrInreg" HeaderText="Nr înreg Servicii (C)" 
                SortExpression="C_nrInreg" ReadOnly="True" />
            <asp:BoundField DataField="RT_nrInreg" HeaderText="Nr înreg Taxe (RT)" 
                SortExpression="RT_nrInreg" ReadOnly="True" />
            <asp:BoundField DataField="Chitanta" HeaderText="Nr chitanţa " 
                SortExpression="Chitanta"  />
            <asp:BoundField DataField="SumaAchitata1" HeaderText="Valoare taxă" 
                SortExpression="Total_Euro" ReadOnly="True" />
            <asp:BoundField DataField="Observatii" HeaderText="Observatii" 
                SortExpression="Observatii" />
            <asp:BoundField DataField="DataSolicitarii" DataFormatString="{0:d}" 
                HeaderText="Data efect prog" SortExpression="DataSolicitarii" 
                ReadOnly="True" Visible="False" />
            <asp:BoundField DataField="DataProgramarii" DataFormatString="{0:d}" 
                HeaderText="Data programării" SortExpression="DataProgramarii" 
                ReadOnly="True" />
            <asp:BoundField DataField="OraProgramarii" HeaderText="Ora programării" 
                SortExpression="OraProgr" ReadOnly="True" />
            <asp:BoundField DataField="SERIE_ACT" 
                HeaderText="Nr act (cazier judiciar)" 
                SortExpression="SERIE_ACT" Visible="False" />
            <asp:BoundField DataField="DataElib" DataFormatString="{0:d}" 
                HeaderText="Data eliberare" SortExpression="DataElib" ReadOnly="True" />
            <asp:BoundField DataField="CopiiM" HeaderText="Copii minori (RCR)" 
                SortExpression="CopiiM" />
            <asp:BoundField DataField="PROG_ID" HeaderText="ID programare" 
                InsertVisible="False" ReadOnly="True" SortExpression="PROG_ID" />
            <asp:BoundField DataField="Misiune1" HeaderText="Misiunea" 
                SortExpression="idConsulat" >
            <HeaderStyle Height="38px" />
            </asp:BoundField>
            <asp:BoundField DataField="User_ID" HeaderText="User_ID" 
                SortExpression="User_ID" Visible="False" />
        </Fields>
        <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
        <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" 
            BorderColor="#999999" BorderStyle="Solid" />
        <RowStyle BackColor="#F7F3F7" ForeColor="Black" BorderColor="Black" 
            BorderStyle="Solid" BorderWidth="1px" />
    </asp:DetailsView>


    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PROGRAMAREConnectionString %>" 
                    
            SelectCommand="SELECT PROG_ID, SOLICITANT_ID, ParentID, idConsulat, (SELECT Denumirea FROM Services WHERE Services.IdService=Programare.IdService) As Service1, 
        (SELECT Denumirea FROM Services WHERE IdService=IdSubserviciu) As Subservice1,
        (SELECT ValoareTotala FROM Taxe WHERE Id_Taxa=IdSumaAchitata) As SumaAchitata1,
        (SELECT Denumire FROM Consulate WHERE Consulate.IdConsulat=PROGRAMARE.IdConsulat) As Misiune1,
        DataSolicitarii, DataProgramarii, OraProgramarii, DataPrel,  C_nrInreg, RT_nrInreg, Chitanta, IdValuta, IdService,
         SERIE_ACT, Userid, DataElib, Observatii, CopiiM, UserId FROM PROGRAMARE WHERE (PROG_ID = @PROG_ID)"             
            DeleteCommand="UPDATE PROGRAMARE SET DataPrel=GetDate(), C_nrInreg =(SELECT MAX(C_nrInreg) + 1 FROM PROGRAMARE WHERE (idConsulat = @IdCons)), RT_nrInreg =(SELECT MAX(RT_nrInreg) + 1 FROM PROGRAMARE WHERE (idConsulat = @IdCons)), IdSumaAchitata =@Taxa, Chitanta =@OrdinIncasare, idSubserviciu =@idSubserv, CopiiM =@Copii WHERE PROG_ID=@ID">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBox1" Name="PROG_ID" PropertyName="Text" DefaultValue="17"/>
        </SelectParameters>
        <DeleteParameters>            
            <asp:ControlParameter ControlID="TextBoxMisID" Name="IdCons" PropertyName="Text" />                                
            <asp:ControlParameter ControlID="DropdownlistTAXA" Name="Taxa" PropertyName="SelectedValue" />
            <asp:ControlParameter ControlID="TextBoxChitanta" Name="OrdinIncasare" PropertyName="Text" />
            <asp:ControlParameter ControlID="DropdownlistSubserv" Name="idSubserv" PropertyName="SelectedValue" />                    
            <asp:ControlParameter ControlID="DropdownlistCopiiM" Name="Copii" PropertyName="SelectedValue" />
            <asp:ControlParameter ControlID="DetailsView2" Name="ID" PropertyName="SelectedValue"/>
        </DeleteParameters>
    </asp:SqlDataSource>


        <asp:SqlDataSource ID="SqlDataSource6" runat="server" 
                ConnectionString="<%$ ConnectionStrings:PROGRAMAREConnectionString %>"                 
            SelectCommand="SELECT ID_Taxa, IdParent, ValoareTotala, IdValuta FROM TAXE WHERE (IdParent = @IdServ) ">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DropDownListSubServ" Name="IdServ" 
                        PropertyName="SelectedValue" />
                </SelectParameters>
            </asp:SqlDataSource>


    <asp:SqlDataSource ID="SqlDataSource4" runat="server" 
                ConnectionString="<%$ ConnectionStrings:JURAMANTConnectionString %>" 
                
            SelectCommand="SELECT ID, Nume, FiulFiica, NrDosar, NrOrdin, CopiiMinori, DataDepJur, Observatii, NrCertificat, NumeTATA, NumeMAMA, DataNastere, LocTaraNastere, MisiuneID, Domiciliu, (SELECT Denumire FROM Consulate WHERE Idconsulat=MisiuneID) As Misiune1 FROM CetatenieFULL  WHERE Nume=@Nume" >
                            
                <SelectParameters>
                    <asp:ControlParameter ControlID="numeprenumeLabel" Name="Nume" 
                        PropertyName="Text" DefaultValue="" />
                </SelectParameters>
         </asp:SqlDataSource>


    <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
        ConnectionString="<%$ ConnectionStrings:PROGRAMAREConnectionString %>" 
        
        
        
        
        SelectCommand="SELECT Solicitanti.ID, Solicitanti.Nume, Solicitanti.Prenume, Solicitanti.DataNastere, PROGRAMARE.PROG_ID, PROGRAMARE.SOLICITANT_ID, 
        PROGRAMARE.DataProgramarii, PROGRAMARE.idService, Solicitanti.ParentID FROM PROGRAMARE INNER JOIN Solicitanti ON PROGRAMARE.SOLICITANT_ID = Solicitanti.ID 
        WHERE (Solicitanti.Nume = @Nume) AND (Solicitanti.Prenume = @Prenume)">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxNume" Name="Nume" PropertyName="Text" />
            <asp:ControlParameter ControlID="TextBoxPrenume" Name="Prenume" PropertyName="Text" />
        </SelectParameters>
    </asp:SqlDataSource>


</div>

</div>

</asp:Content>
